package com.qiezi.bean;

import java.io.Serializable;
import java.util.Objects;

public class CategoryTwoBean extends SiteBean {


    private int pid;

    public int getPid() {
        return pid;
    }

    public void setPid(int pid) {
        this.pid = pid;
    }


    @Override
    public String toString() {

        StringBuilder stringBuilder = new StringBuilder("\n{\n\tid:").append(getId())
                .append("\n\tpid:").append(getPid())
                .append("\n\tname:").append(getName())
                .append("\n\timage:").append(getImage()).append("\n}");
        return stringBuilder.toString();
    }

    @Override
    public int hashCode() {

        return Objects.hash(getId(), pid, getName());
    }

    @Override
    public boolean equals(Object o) {
        if (this == o) return true;
        if (o == null || getClass() != o.getClass()) return false;
        CategoryTwoBean that = (CategoryTwoBean) o;
        return getId() == that.getId();
    }
}
